Your component may provide one or more configuration functions. These functions allow applications to configure your component before the Movie Toolbox calls your component to start the export process. Note that applications may call these functions directly.
All of these functions are optional. If your component receives a request that it does not support, you should return the badComponentSelector error code. In addition, your component should work properly even if none of these functions is called.
These functions address a variety of configuration issues. Applications can retrieve additional data from your component by calling the MovieExportGetAuxiliaryData function.
Applications can specify a progress function for use by your component by calling the MovieExportSetProgressProc function.
Applications can instruct your component to display its user dialog box by calling the MovieExportDoUserDialog function.
The MovieExportSetProgressProc function allows an application to assign a movie progress function.
pascal ComponentResult MovieExportSetProgressPro
(MovieImportComponent ci,
MovieProgressUPP proc,
long refcon);
Some data export operations may be time-consuming, and application developers may therefore choose to display progress information to the user. Your component provides this information to an application's progress function. As your component processes an export request, you should call the progress function occasionally in order to report on the progress of the operation. Use a progress code of progressOpExportMovie . The application can then present this information to the user.
These progress functions must support the same interface as Movie Toolbox progress functions. That interface is discussed in the chapter "Movie Toolbox" in Inside Macintosh: QuickTime . Note that this interface not only allows you to report progress to the application, but also allows the application to cancel the request.
The MovieExportGetAuxiliaryData function allows an application to retrieve additional data from your component. This additional data may be created during the data export process.
pascal ComponentResult MovieExportGetAuxiliaryData
(MovieImportComponent ci,
Handle dataH,
OSType *handleType);
The MovieExportGetAuxiliaryData function allows an application to retrieve additional data that is generated during the data export process. The application may then use the data as appropriate. Your component may create this data in cases where the target data type cannot accommodate all of the converted data. For example, if your component exports data into 'TEXT' handles or files, you might choose to preserve associated style information for that text. However, 'TEXT' resources cannot store that style information. You could save that style information in a 'styl' handle and allow an application to retrieve it after the conversion.
Your component should expect the application to call this function after the export process ends.
The MovieExportDoUserDialog function allows an application to request that your component display its user dialog box.
pascal ComponentResult MovieExportDoUserDialog
(MovieImportComponent ci,
const FSSpec *theFile,
Handle theData,
Boolean *canceled);
Your movie data export component may support a user dialog box that allows the user to configure an export operation. For components that support such a dialog box, the MovieExportDoUserDialog function allows an application to tell you when to display the dialog box to the user.
If your component supports a user dialog box, be sure to set the hasMovieExportUserInterface flag in your component's componentFlags field.
| Previous | Chapter contents | Chapter top | Section top |